home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Periodicals / develop / develop 10 code / GWorld Drawing / GWorld Routines / mapping.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-08  |  886 b   |  31 lines  |  [TEXT/KAHL]

  1. #ifndef mappingDefined
  2. #define mappingDefined
  3.  
  4. #ifndef __TYPES__
  5.     #include <Types.h>
  6. #endif
  7. #ifndef __QUICKDRAW__
  8.     #include <QuickDraw.h>
  9. #endif
  10.  
  11. #define ff(x)        ((Fixed)(x) << 16)
  12.  
  13. typedef struct {
  14.     Fixed map[3][2];
  15. } mapping;
  16.  
  17. void MapXY(const mapping* map, Fixed* x, Fixed* y);
  18. Point* MapQDPoint(const mapping* map, Point* p);
  19. Rect* MapRectangle(const mapping* map, Rect* r);
  20. RgnHandle MapRectToRgn(const mapping* map, const Rect* r, RgnHandle rgn);
  21.  
  22. mapping* SetIdentityMapping(mapping* map);
  23. mapping* OffsetMapping(mapping* map, Fixed offsetX, Fixed offsetY);
  24. mapping* ScaleMapping(mapping* map, Fixed scaleX, Fixed scaleY, Fixed aboutX, Fixed aboutY);
  25. mapping* RotateMapping(mapping* map, Fixed angle, Fixed aboutX, Fixed aboutY);
  26. mapping* InvertMapping(mapping* map);
  27. mapping* ConcateMapping(mapping* dst, const mapping* map);
  28. Boolean IdentityMapping(const mapping* map);
  29.  
  30. #endif
  31.